from abc import ABC, abstractmethod

from sklearn.base import BaseEstimator


class StreamEstimator(ABC, BaseEstimator):
    
    @abstractmethod
    def fit(self, stream_dataset):
        """
        Train a stream model.

        :param stream_dataset: Instances of a stream dataset.
        """
        raise NotImplementedError("The fit() method of StreamEstimator must be implemented.")
    
    
    @abstractmethod
    def predict(self, X):
        """
        Predict y for input X.

        :param X: input.
        """
        raise NotImplementedError("The predict() method of StreamEstimator must be implemented.")
    
    @abstractmethod
    def evaluate(self, y_pred, y_true):
        """
        Evaluate by comparing predicted y and y_true.

        :param y_pred: predicted y.
        :param y_true: ground-truth y.
        """
        raise NotImplementedError("The evaluate() method of StreamEstimator must be implemented.")